package com.evildog.workspace.file.convert;

import com.evildog.workspace.common.result.PagedResult;
import java.util.List;
import com.evildog.workspace.file.vo.BucketPageVO;
import com.evildog.workspace.file.vo.BucketVO;
import com.evildog.workspace.file.dto.BucketPageDTO;
import com.evildog.workspace.file.dto.BucketDTO;
import com.evildog.workspace.file.model.BucketParam;
import com.evildog.workspace.file.model.BucketPageParam;
import com.evildog.workspace.file.bo.BucketBO;
import com.evildog.workspace.file.bo.BucketPageBO;
import com.evildog.workspace.file.entity.Bucket;
import com.evildog.workspace.file.entity.BucketPageDO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface BucketConvert {

    BucketConvert INSTANCE = Mappers.getMapper(BucketConvert.class);

    BucketPageDTO convert(BucketPageParam bucketPageParam);

    BucketDTO convert(BucketParam bucketParam);

    @Mapping(target = "isDeleted", ignore = true)
    Bucket convert(BucketDTO bucketDTO);

    BucketPageDO convert(BucketPageDTO bucketPageDTO);

    BucketVO convert(BucketBO bucketBO);

    BucketBO convert(Bucket bucket);

    List<BucketBO> convert(List<Bucket> bucketList);

    @Mappings({})
    PagedResult<BucketPageBO> convert(IPage<BucketPageDO> page);

    PagedResult<BucketPageVO> convert(PagedResult<BucketPageBO> page);
}